package org.sc.demo.config;

import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @version 1.0
 * @Author: 许啸林
 * @Date: 2021/6/20 16:01
 * security 可以通过 yml,配置类 设置登录用户名密码
 */
//@Configuration
public class SecuritySimpleCfg extends WebSecurityConfigurerAdapter {
    /**
     * configure 设置登录用户信息
     */
    /*
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        String pwdEcoder = bCryptPasswordEncoder.encode("123456");
        auth.inMemoryAuthentication().withUser("admin").password(pwdEcoder).roles("admin");
    }

    *//**
     *  根据加密方式设置编码器
     * @return
     *//*
    @Bean
    PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }*/
}
